test -n "$BUILD_TAR" || usage
shift
+origcwd=`pwd`
tempdir=`mktemp -d tmp-commit-yocto-build.XXXXXXXXXX`
cd $tempdir
mkdir fs
cd fs
fakeroot -s ../fakeroot.db tar xf $BUILD_TAR
fakeroot -i ../fakeroot.db ostree --repo=${OSTREE_REPO} commit -s "Build (need ostree git version here)" -b gnomeos-base
+cd ${origcwd}
rm -rf $tempdir
cd ${WORKDIR}
umount fs
+ rmdir fs
mv ${OBJ}.tmp ${OBJ}
fi
ARGS="$@"
-if ! [ echo $ARGS | grep -q 'init=']; then
+if ! echo $ARGS | grep -q 'init='; then
ARGS="init=/ostree-init $ARGS"
fi
-if ! [ echo $ARGS | grep -q 'root=']; then
+if ! echo $ARGS | grep -q 'root='; then
ARGS="root=/dev/hda $ARGS"
fi
+if ! echo $ARGS | grep -q 'ostree='; then
+ ARGS="ostree=current $ARGS"
+fi
exec qemu-kvm -kernel ./tmp/deploy/images/bzImage-qemux86.bin -hda gnomeos-fs.img -append "$ARGS"
PACKAGE_INSTALL = "task-core-boot task-base-extended \
ostree ostree-init"
RDEPENDS += "${PACKAGE_INSTALL}"
-DEPENDS += "virtual/fakeroot-native"
+DEPENDS += "makedevs-native virtual/fakeroot-native"
EXCLUDE_FROM_WORLD = "1"
do_build[nostamp] = "1"
do_rootfs[umask] = 022
+def gnomeos_get_devtable_list(d):
+ return bb.which(d.getVar('BBPATH', 1), 'files/device_table-minimal.txt')
+
# Must call real_do_rootfs() from inside here, rather than as a separate
# task, so that we have a single fakeroot context for the whole process.
fakeroot do_rootfs () {
rootfs_${IMAGE_PKGTYPE}_do_rootfs
+ makedevs -r ${IMAGE_ROOTFS} -D ${@gnomeos_get_devtable_list(d)}
+
echo "GNOME OS Unix login" > ${IMAGE_ROOTFS}/etc/issue
TOPROOT_BIND_MOUNTS="home root tmp"
for d in $READONLY_BIND_MOUNTS; do
mv ${IMAGE_ROOTFS}/$d .
done
+ # Also copy over any static /dev contents for now
+ mv ${IMAGE_ROOTFS}/dev .
rm -rf ${IMAGE_ROOTFS}
mv ${WORKDIR}/gnomeos-contents ${IMAGE_ROOTFS}
exit (1);
}
+ fprintf (stderr, "ostree-init kernel cmdline: %s\n", buf);
+ fflush (stderr);
p = buf;
while (p != NULL)
{
snprintf (destpath, sizeof(destpath), "/ostree/%s/var", ostree_root);
if (mount ("/ostree/var", destpath, NULL, MS_BIND, NULL) < 0)
{
- perrorv ("Failed to bind mount /ostree/var to '%s'", destpath);
+ perrorv ("Failed to bind mount / to '%s'", destpath);
exit (1);
}
init_argv[i] = argv[i];
init_argv[i] = NULL;
- fprintf (stderr, "ostree-init: Running real init\n");
+ fprintf (stderr, "ostree-init: Running real init (argc=%d)\n", argc);
fflush (stderr);
execv (INIT_PATH, init_argv);
perrorv ("Failed to exec init '%s'", INIT_PATH);